home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 August / MW 8 2003 CD1.iso / Inside Macworld / Product News / gimp-1.2.4.sit / gimp-1.2.4 / devel-docs / libgimp / sgml / gimpfileops.sgml < prev    next >
Encoding:
Text File  |  2003-05-20  |  11.4 KB  |  253 lines

  1. <refentry id="libgimp-gimpfileops" revision="19 Jan 2001">
  2. <refmeta>
  3. <refentrytitle>gimpfileops</refentrytitle>
  4. <manvolnum>3</manvolnum>
  5. <refmiscinfo>LIBGIMP Library</refmiscinfo>
  6. </refmeta>
  7.  
  8. <refnamediv>
  9. <refname>gimpfileops</refname><refpurpose></refpurpose>
  10. </refnamediv>
  11.  
  12. <refsynopsisdiv><title>Synopsis</title>
  13. <synopsis>
  14.  
  15.  
  16.  
  17. <link linkend="gchar">gchar</link>*      <link linkend="gimp-temp-name">gimp_temp_name</link>                  (<link linkend="gchar">gchar</link> *extension);
  18. <link linkend="gint32">gint32</link>      <link linkend="gimp-file-load">gimp_file_load</link>                  (<link linkend="GimpRunModeType">GimpRunModeType</link> run_mode,
  19.                                              <link linkend="gchar">gchar</link> *filename,
  20.                                              <link linkend="gchar">gchar</link> *raw_filename);
  21. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-file-save">gimp_file_save</link>                  (<link linkend="GimpRunModeType">GimpRunModeType</link> run_mode,
  22.                                              <link linkend="gint32">gint32</link> image_ID,
  23.                                              <link linkend="gint32">gint32</link> drawable_ID,
  24.                                              <link linkend="gchar">gchar</link> *filename,
  25.                                              <link linkend="gchar">gchar</link> *raw_filename);
  26. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-register-magic-load-handler">gimp_register_magic_load_handler</link>
  27.                                             (<link linkend="gchar">gchar</link> *procedure_name,
  28.                                              <link linkend="gchar">gchar</link> *extensions,
  29.                                              <link linkend="gchar">gchar</link> *prefixes,
  30.                                              <link linkend="gchar">gchar</link> *magics);
  31. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-register-load-handler">gimp_register_load_handler</link>      (<link linkend="gchar">gchar</link> *procedure_name,
  32.                                              <link linkend="gchar">gchar</link> *extensions,
  33.                                              <link linkend="gchar">gchar</link> *prefixes);
  34. <link linkend="gboolean">gboolean</link>    <link linkend="gimp-register-save-handler">gimp_register_save_handler</link>      (<link linkend="gchar">gchar</link> *procedure_name,
  35.                                              <link linkend="gchar">gchar</link> *extensions,
  36.                                              <link linkend="gchar">gchar</link> *prefixes);
  37. </synopsis>
  38. </refsynopsisdiv>
  39.  
  40.  
  41.  
  42.  
  43.  
  44. <refsect1>
  45. <title>Description</title>
  46. <para>
  47.  
  48. </para>
  49. </refsect1>
  50.  
  51. <refsect1>
  52. <title>Details</title>
  53. <refsect2>
  54. <title><anchor id="gimp-temp-name">gimp_temp_name ()</title>
  55. <programlisting><link linkend="gchar">gchar</link>*      gimp_temp_name                  (<link linkend="gchar">gchar</link> *extension);</programlisting>
  56. <para>
  57. Generates a unique filename.
  58. </para>
  59. <para>
  60. Generates a unique filename using the temp path supplied in the
  61. user's gimprc.</para>
  62. <para>
  63.  
  64. </para><informaltable pgwide=1 frame="none" role="params">
  65. <tgroup cols="2">
  66. <colspec colwidth="2*">
  67. <colspec colwidth="8*">
  68. <tbody>
  69. <row><entry align="right"><parameter>extension</parameter> :</entry>
  70. <entry> The extension the file will have.
  71. </entry></row>
  72. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The new temp filename.
  73. </entry></row>
  74. </tbody></tgroup></informaltable></refsect2>
  75. <refsect2>
  76. <title><anchor id="gimp-file-load">gimp_file_load ()</title>
  77. <programlisting><link linkend="gint32">gint32</link>      gimp_file_load                  (<link linkend="GimpRunModeType">GimpRunModeType</link> run_mode,
  78.                                              <link linkend="gchar">gchar</link> *filename,
  79.                                              <link linkend="gchar">gchar</link> *raw_filename);</programlisting>
  80. <para>
  81. Loads a file by extension.
  82. </para>
  83. <para>
  84. This procedure invokes the correct file load handler according to
  85. the file's extension and/or prefix. The name of the file to load is
  86. typically a full pathname, and the name entered is what the user
  87. actually typed before prepending a directory path. The reason for
  88. this is that if the user types http://www.xcf/~gimp/ he wants to
  89. fetch a URL, and the full pathname will not look like a URL.</para>
  90. <para>
  91.  
  92. </para><informaltable pgwide=1 frame="none" role="params">
  93. <tgroup cols="2">
  94. <colspec colwidth="2*">
  95. <colspec colwidth="8*">
  96. <tbody>
  97. <row><entry align="right"><parameter>run_mode</parameter> :</entry>
  98. <entry> The run mode.
  99. </entry></row>
  100. <row><entry align="right"><parameter>filename</parameter> :</entry>
  101. <entry> The name of the file to load.
  102. </entry></row>
  103. <row><entry align="right"><parameter>raw_filename</parameter> :</entry>
  104. <entry> The name entered.
  105. </entry></row>
  106. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> The output image.
  107. </entry></row>
  108. </tbody></tgroup></informaltable></refsect2>
  109. <refsect2>
  110. <title><anchor id="gimp-file-save">gimp_file_save ()</title>
  111. <programlisting><link linkend="gboolean">gboolean</link>    gimp_file_save                  (<link linkend="GimpRunModeType">GimpRunModeType</link> run_mode,
  112.                                              <link linkend="gint32">gint32</link> image_ID,
  113.                                              <link linkend="gint32">gint32</link> drawable_ID,
  114.                                              <link linkend="gchar">gchar</link> *filename,
  115.                                              <link linkend="gchar">gchar</link> *raw_filename);</programlisting>
  116. <para>
  117. Saves a file by extension.
  118. </para>
  119. <para>
  120. This procedure invokes the correct file save handler according to
  121. the file's extension and/or prefix. The name of the file to save is
  122. typically a full pathname, and the name entered is what the user
  123. actually typed before prepending a directory path. The reason for
  124. this is that if the user types http://www.xcf/~gimp/ she wants to
  125. fetch a URL, and the full pathname will not look like a URL.</para>
  126. <para>
  127.  
  128. </para><informaltable pgwide=1 frame="none" role="params">
  129. <tgroup cols="2">
  130. <colspec colwidth="2*">
  131. <colspec colwidth="8*">
  132. <tbody>
  133. <row><entry align="right"><parameter>run_mode</parameter> :</entry>
  134. <entry> The run mode.
  135. </entry></row>
  136. <row><entry align="right"><parameter>image_ID</parameter> :</entry>
  137. <entry> Input image.
  138. </entry></row>
  139. <row><entry align="right"><parameter>drawable_ID</parameter> :</entry>
  140. <entry> Drawable to save.
  141. </entry></row>
  142. <row><entry align="right"><parameter>filename</parameter> :</entry>
  143. <entry> The name of the file to save the image in.
  144. </entry></row>
  145. <row><entry align="right"><parameter>raw_filename</parameter> :</entry>
  146. <entry> The name of the file to save the image in.
  147. </entry></row>
  148. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  149. </entry></row>
  150. </tbody></tgroup></informaltable></refsect2>
  151. <refsect2>
  152. <title><anchor id="gimp-register-magic-load-handler">gimp_register_magic_load_handler ()</title>
  153. <programlisting><link linkend="gboolean">gboolean</link>    gimp_register_magic_load_handler
  154.                                             (<link linkend="gchar">gchar</link> *procedure_name,
  155.                                              <link linkend="gchar">gchar</link> *extensions,
  156.                                              <link linkend="gchar">gchar</link> *prefixes,
  157.                                              <link linkend="gchar">gchar</link> *magics);</programlisting>
  158. <para>
  159. Registers a file load handler procedure.
  160. </para>
  161. <para>
  162. Registers a procedural database procedure to be called to load files
  163. of a particular file format using magic file information.</para>
  164. <para>
  165.  
  166. </para><informaltable pgwide=1 frame="none" role="params">
  167. <tgroup cols="2">
  168. <colspec colwidth="2*">
  169. <colspec colwidth="8*">
  170. <tbody>
  171. <row><entry align="right"><parameter>procedure_name</parameter> :</entry>
  172. <entry> The name of the procedure to be used for loading.
  173. </entry></row>
  174. <row><entry align="right"><parameter>extensions</parameter> :</entry>
  175. <entry> comma separated list of extensions this handler can load (i.e. \"jpg,jpeg\").
  176. </entry></row>
  177. <row><entry align="right"><parameter>prefixes</parameter> :</entry>
  178. <entry> comma separated list of prefixes this handler can load (i.e. \"http:,ftp:\").
  179. </entry></row>
  180. <row><entry align="right"><parameter>magics</parameter> :</entry>
  181. <entry> comma separated list of magic file information this handler can load (i.e. \"0,string,GIF\").
  182. </entry></row>
  183. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  184. </entry></row>
  185. </tbody></tgroup></informaltable></refsect2>
  186. <refsect2>
  187. <title><anchor id="gimp-register-load-handler">gimp_register_load_handler ()</title>
  188. <programlisting><link linkend="gboolean">gboolean</link>    gimp_register_load_handler      (<link linkend="gchar">gchar</link> *procedure_name,
  189.                                              <link linkend="gchar">gchar</link> *extensions,
  190.                                              <link linkend="gchar">gchar</link> *prefixes);</programlisting>
  191. <para>
  192. Registers a file load handler procedure.
  193. </para>
  194. <para>
  195. Registers a procedural database procedure to be called to load files
  196. of a particular file format.</para>
  197. <para>
  198.  
  199. </para><informaltable pgwide=1 frame="none" role="params">
  200. <tgroup cols="2">
  201. <colspec colwidth="2*">
  202. <colspec colwidth="8*">
  203. <tbody>
  204. <row><entry align="right"><parameter>procedure_name</parameter> :</entry>
  205. <entry> The name of the procedure to be used for loading.
  206. </entry></row>
  207. <row><entry align="right"><parameter>extensions</parameter> :</entry>
  208. <entry> comma separated list of extensions this handler can load (i.e. \"jpg,jpeg\").
  209. </entry></row>
  210. <row><entry align="right"><parameter>prefixes</parameter> :</entry>
  211. <entry> comma separated list of prefixes this handler can load (i.e. \"http:,ftp:\").
  212. </entry></row>
  213. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  214. </entry></row>
  215. </tbody></tgroup></informaltable></refsect2>
  216. <refsect2>
  217. <title><anchor id="gimp-register-save-handler">gimp_register_save_handler ()</title>
  218. <programlisting><link linkend="gboolean">gboolean</link>    gimp_register_save_handler      (<link linkend="gchar">gchar</link> *procedure_name,
  219.                                              <link linkend="gchar">gchar</link> *extensions,
  220.                                              <link linkend="gchar">gchar</link> *prefixes);</programlisting>
  221. <para>
  222. Registers a file save handler procedure.
  223. </para>
  224. <para>
  225. Registers a procedural database procedure to be called to save files
  226. in a particular file format.</para>
  227. <para>
  228.  
  229. </para><informaltable pgwide=1 frame="none" role="params">
  230. <tgroup cols="2">
  231. <colspec colwidth="2*">
  232. <colspec colwidth="8*">
  233. <tbody>
  234. <row><entry align="right"><parameter>procedure_name</parameter> :</entry>
  235. <entry> The name of the procedure to be used for saving.
  236. </entry></row>
  237. <row><entry align="right"><parameter>extensions</parameter> :</entry>
  238. <entry> comma separated list of extensions this handler can save (i.e. \"jpg,jpeg\").
  239. </entry></row>
  240. <row><entry align="right"><parameter>prefixes</parameter> :</entry>
  241. <entry> comma separated list of prefixes this handler can save (i.e. \"http:,ftp:\").
  242. </entry></row>
  243. <row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> TRUE on success.
  244. </entry></row>
  245. </tbody></tgroup></informaltable></refsect2>
  246.  
  247. </refsect1>
  248.  
  249.  
  250.  
  251.  
  252. </refentry>
  253.